package com.medusa.gruul.payment.service.mp.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.medusa.gruul.common.system.model.model.Platform;
import com.medusa.gruul.payment.api.entity.PaymentMerchantConfig;
import com.medusa.gruul.common.model.enums.PayType;
import com.medusa.gruul.payment.service.model.vo.MerchantDetailsVO;
import com.medusa.gruul.payment.service.mp.mapper.MerchantDetailsMapper;
import com.medusa.gruul.payment.service.mp.mapper.PaymentMerchantConfigMapper;
import com.medusa.gruul.payment.service.mp.service.IPaymentMerchantConfigService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author xiaoq
 * @ Description
 * @date 2022-07-18 09:28
 */
@Service
@RequiredArgsConstructor
public class PaymentMerchantConfigServiceImpl extends ServiceImpl<PaymentMerchantConfigMapper, PaymentMerchantConfig> implements IPaymentMerchantConfigService {

    private final MerchantDetailsMapper merchantDetailsMapper;


    @Override
    public List<MerchantDetailsVO> getMerchantDetail(PayType payType) {
        return merchantDetailsMapper.getMerchantDetailInfo(payType);
    }

    @Override
    public MerchantDetailsVO getMerchantDetailByPlatform(PayType payType, Platform payPlatform) {
        return merchantDetailsMapper.getMerchantDetailInfoByPlatform(payType, payPlatform);
    }

}
